/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Homework.demo03;

import java.util.Enumeration;
import java.util.Hashtable;

/**
 *
 * @author Administrator
 */
public class MapDemo1 {
    public  static void main(String [] args){
        Hashtable s=new Hashtable();
        s.put("john",new Integer(90));
        s.put("令狐冲",new Integer(100));
        s.put("ale",new Integer(50));
        
        System.out.println("hashtable的内容是:");
        System.out.println(s);
        
        Enumeration e=s.elements();
        while(e.hasMoreElements()){
            Integer tmp = (Integer) e.nextElement();
            System.out.println(tmp.intValue()+"");
            
        }
        System.out.println("john的成绩是:");
        System.out.println(s.get("john"));
        if(s.containsValue(90)){
            System.out.println("yes!");
        }else{
            System.out.println("查无此人");
        }
    }

}
